//
//  CYPersonReModel.m
//  CreditAddressBook
//
//  Created by Mosu&Cuu on 16/1/19.
//  Copyright © 2016年 Lee. All rights reserved.
//

#import "CYPersonReModel.h"

@implementation CYPersonReModel

-(instancetype)initWithDictionary:(NSDictionary *)dic{
    self = [super init];
    if(nil == self){
        return nil;
    }
    
    NSString *str = [dic objectForKey:@"lendTime"];
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:str.longLongValue/1000];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setDateFormat:@"yyyy年MM月dd日"];
    self.lendTime = [dateFormatter stringFromDate:date];
    
    
    NSString *str1 = [dic objectForKey:@"createTime"];
    NSDate *date1 = [NSDate dateWithTimeIntervalSince1970:str1.longLongValue/1000];
    NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc]init];
    [dateFormatter1 setDateFormat:@"yyyy年MM月dd日"];
    self.createTime = [dateFormatter1 stringFromDate:date1];
     
    self.name = [dic objectForKey:@"name"];
    self.certificateNo = [dic objectForKey:@"certificateNo"];
    self.amountPrice = [dic objectForKey:@"amountPrice"];
    self.phone = [dic objectForKey:@"phone"];
    self.photo = [dic objectForKey:@"photo"];
    self.isExamine = [dic objectForKey:@"isExamine"];
    self.createid = [dic objectForKey:@"id"];
    self.qq = [dic objectForKey:@"qq"];
    self.province = [dic objectForKey:@"province"];
    self.city = [dic objectForKey:@"city"];
    self.area = [dic objectForKey:@"district"];
    self.exmainreson = [dic objectForKey:@"examineReason"];
    self.title = [dic objectForKey:@"title"];
    self.sex =[dic objectForKey:@"sex"];
    self.content = [dic objectForKey:@"defaultContent"];
    
    return self;
}

@end
